package vn.sms.vsms.provider;

import android.provider.BaseColumns;

public final class DbSchema {
	public static final String DATABASE_NAME = "db_sms";
	public static final int DATABASE_VERSION = 1;
	public static final String SORT_ASC = " ASC";
	public static final String SORT_DESC = " DESC";
	public static final String[] ORDERS = {SORT_ASC,SORT_DESC};
	public static final int OFF = 0;
	public static final int ON = 1;
 
	
	public static final class GroupSchema implements BaseColumns {
		public static final String TABLE_NAME = "sms_group";
		public static final String COLUMN_ID = "id";
		public static final String COLUMN_NAME = "name";
		public static final String COLUMN_PARENT = "parent";
		public static final String COLUMN_DAY = "day";
		public static final String COLUMN_STRUCTURE = "structure";
		public static final String COLUMN_PHONE = "phone";
		public static final String COLUMN_STATUS = "status";
		public static final String COLUMN_ORDER = "`order`";
		public static final String COLUMN_ORDER_ORIGIN = "order";
		public static final String COLUMN_MONEY = "money";
		public static final String COLUMN_GUIDE = "isguide";
		public static final String COLUMN_ICON = "icon";
		public static final String COLUMN_POPUP = "ispopup";
		public static final String COLUMN_POPUPTITLE = "popup_title";
		
		
		//
		public static final String CREATE_TABLE = "CREATE  TABLE " + TABLE_NAME 				
				+" (" + COLUMN_NAME + " TEXT, "
				+ COLUMN_PARENT + " INTEGER NOT NULL  DEFAULT 0, "
				+ COLUMN_ID + " INTEGER PRIMARY KEY  NOT NULL  UNIQUE , "
				+ COLUMN_DAY + " NTEGER NOT NULL  DEFAULT 0, " 
				+ COLUMN_STRUCTURE + " CHAR, " 
				+ COLUMN_PHONE + " INTEGER DEFAULT 0, "
				+ COLUMN_STATUS + " INTEGER NOT NULL  DEFAULT 0, "
				+ COLUMN_ORDER + " INTEGER DEFAULT 0," 
				+ COLUMN_MONEY + " INTEGER DEFAULT 0, "				
				+ COLUMN_ICON + " text,"
				+ COLUMN_GUIDE + " INTEGER DEFAULT 0, "
				+ COLUMN_POPUP + " INTEGER DEFAULT 0,"
				+ COLUMN_POPUPTITLE + " text)"
				;
		
 
		public static final String DROP_TABLE = "DROP TABLE IF EXISTS " + TABLE_NAME;
		
	}
	
 
}
